package org.dk.poitalk.dao;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import org.dk.poitalk.model.DomainEntity;

public interface GenericDao<T extends DomainEntity, PK extends Serializable> {

	void save(T entity);

	T saveOrUpdate(T entity);
	
	int delete(T entity);

	T find(Class<T> entityClass, PK primaryKey);
	
	List<T> search (String namedQuery, Map<String, Object> mapValue);
	
	List<T> search (Map<String, String> mapValue);
}
